package com.rs.service;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlMimeType;

@WebService
public interface GwService {

    /***
     * 附件传输上传
     * @param transId  from表单的名字也是id
     * @param fileType 文件类型
     * @param fileName 文件名称
     * @param file base64编码文件
     * @param fragId 分片序号
     * @param ext1  无效，传值为“”
     * @return
     */
    @WebMethod
    @WebResult(name = "result")
    @XmlMimeType(value = "application/octet-stream")
    public String ldtpFileSend(@WebParam(name = "transId") String transId,
                               @WebParam(name = "fileType") String fileType,
                               @WebParam(name = "fileName") String fileName,
                               @WebParam(name = "file") byte[] file,
                               @WebParam(name = "fragId") int fragId,
                               @WebParam(name = "ext1") String ext1);

    /***
     * from表单
     *
     * @param transId from表单的名字也是id
     * @param appId    发送应用appId
     * @param formType 1开始传输 2结束传输
     * @param form base64编码form
     * @param ext1  无效，传值为“”
     * @return String
     */
    @WebMethod
    @WebResult(name = "result")
    @XmlMimeType(value = "application/octet-stream")
    String ldtpFormSend(@WebParam(name = "transId") String transId,
                        @WebParam(name = "appId") String appId,
                        @WebParam(name = "formType") String formType,
                        @WebParam(name = "form") String form,
                        @WebParam(name = "ext1") String ext1);
}
